export default class BusinessOpportunities {
  static list (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity', 'get', params, axiosOption, httpOption);
  }
  static add (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity', 'post', params, axiosOption, httpOption);
  }
  static addCustomer (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/createWithCustomer', 'post', params, axiosOption, httpOption);
  }
  static editCustomer (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/update', 'post', params, axiosOption, httpOption);
  }
  static update (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/update', 'post', params, axiosOption, httpOption);
  }
  // 商机详情
  static detail (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/businessOpportunity/${params}`, 'get', axiosOption, httpOption);
  }
  static delete (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/businessOpportunity/delete/${params}`, 'get', axiosOption, httpOption);
  }
  static deletes (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/delete', 'post', params, axiosOption, httpOption);
  }

  static Tasklist (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/list', 'post', params, axiosOption, httpOption);
  }
  static Taskadd (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/add', 'post', params, axiosOption, httpOption);
  }
  static Taskupdate (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/update', 'post', params, axiosOption, httpOption);
  }
  static Taskdetail (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/view', 'get', params, axiosOption, httpOption);
  }
  static Taskdelete (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/delete', 'post', params, axiosOption, httpOption);
  }
  static submitUserTask (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/submitUserTask', 'post', params, axiosOption, httpOption);
  }
  static submitUserOpportunities (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/submitUserTask', 'post', params, axiosOption, httpOption);
  }
  static checkTaskComplete (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/businessOpportunity/checkTaskComplete/${params}`, 'get', params, axiosOption, httpOption);
  }
  static viewByClueId (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/businessOpportunity/view/${params}`, 'get', params, axiosOption, httpOption);
  }
  static ExportFile (sender, params, fileName) {
    return sender.download('admin/businessOpportunity/listExport', params, fileName);
  }
  static applicationApply (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/checkTaskComplete', 'post', params, axiosOption, httpOption);
  }
  /**
   * 商机详情页
   */

  // 添加投标信息
  static addBid (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/bid/addBid', 'post', params, axiosOption, httpOption);
  }
  // 查询投标信息
  static getBid (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/businessOpportunity/bid/${params}`, 'get', axiosOption, httpOption);
  }
  // 添加商机小组成员
  static addTeam (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/team/addTeam', 'post', params, axiosOption, httpOption);
  }
  // 删除商机小组成员
  static deleteTeam (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/team/deleteTeam', 'post', params, axiosOption, httpOption);
  }
  // 查询商机小组成员
  static listTeam (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/team/queryTeam/${params}`, 'get', axiosOption, httpOption);
  }
  // 添加商机任务
  static addTask (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/add', 'post', params, axiosOption, httpOption);
  }
  // 查询商机任务
  static listTask (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/commerce/opportunityTask/list/${params}`, 'get', axiosOption, httpOption);
  }
  // 修改商机任务
  static AmendTask (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/update', 'post', params, axiosOption, httpOption);
  }
  // 删除商机任务
  static delTask (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/commerce/opportunityTask/deleteId/${params}`, 'get', axiosOption, httpOption)
  }
  // 商机任务审批
  static approvalTask (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/business/approvalTask', 'post', params, axiosOption, httpOption);
  }
  // 商机任务交付
  static deliverTask (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/commerce/opportunityTask/taskComplete', 'post', params, axiosOption, httpOption);
  }
  // 添加审批
  static addApproval (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/business/opportunity/addApproval', 'post', params, axiosOption, httpOption);
  }
  // 查询审批列表
  static listApproval (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/business/opportunity/queryList/${params}`, 'get', axiosOption, httpOption);
  }
  // 删除商机审批
  static delApproval (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/business/opportunity/delApproval/${params}`, 'get', axiosOption, httpOption);
  }
  // 审批商机
  static approvebusinessOpportunities (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/throughApproval', 'post', params, axiosOption, httpOption);
  }
  // 修改商机审批
  static AmendApprove (sender, params, axiosOption, httpOption) {
    return sender.doUrl('/admin/business/opportunity/upApproval', 'post', params, axiosOption, httpOption);
  }
  // 发布商机动态
  static addDynamic (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/business/dynamic/toAdd', 'post', params, axiosOption, httpOption);
  }
  // 删除商机动态
  static deleteDynamic (sender, params, axiosOption, httpOption) {
    return sender.doUrl(`admin/business/dynamic/deleteDynamic/${params}`, 'post', axiosOption, httpOption);
  }

  // 查询商机动态列表
  static listDynamic (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/business/dynamic/oppo/getList', 'post', params, axiosOption, httpOption);
  }
  // 查询商机立项抄送人信息
  static selectDivision (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/selectDivision', 'post', params, axiosOption, httpOption);
  }
  // 商机赢单分配确认
  static winDistributionOppo (sender, params, axiosOption, httpOption) {
    return sender.doUrl('admin/businessOpportunity/winDistributionOppo', 'post', params, axiosOption, httpOption);
  }
}
